var mongoose = require('mongoose')

mongoose.connect('mongodb://localhost/myclass')

var Schema = mongoose.Schema

var studentSchema = new Schema({
  name: {
    type: String,
    required: true
  },
  birthday: {
	  type:Date,
	  required:true
  },
  prov: {
    type: String,
    required: true
  },
  city: {
    type: String,
    required: true
  },
  address: {
    type: String,
    required: true
  },
  expressid: {
    type: String,
    required: true
  }
})

// 直接导出模型构造函数
module.exports = mongoose.model('Student', studentSchema)
